#pragma once

#include <d3d9.h>
#include <d3dx9.h>
#include "../timer.h"
#include "../XenMemory/XenMemory.h"
#include "../Input.h"

class XenInfo
{
private:
	XenMemory *xenMemory;

	IDirect3DDevice9 *pIDirect3DDevice9;

	int screenWidth;
	int screenHeight;
	float scaleX;
	float scaleY;

	static bool displayInfoBar;

	int maxXp;

	//Level calc timer
	time_t calcLevelSTime;
	int calcLevelSXp;
	int calcLevelOldXp;
	int calcLevelXpHr;
	int calcLevelMaxXpHr;
	int calcLevelTotalXpMade;
	int level[80];

	//Gold calc timer
	time_t calcGoldSTime;
	int calcGoldStart;
	int calcGoldOld;
	int calcGoldHr;
	int calcGoldMaxHr;
	int calcGoldTotalMade;

	D3DXFONT_DESC fInfo;

	//Info Background
#define INFOBG_LOC  "xenergy/images/infopanel.bmp"
	LPDIRECT3DTEXTURE9 infoBgTexture;
	LPD3DXSPRITE infoBgSprite;
	LPD3DXFONT statsInfoFont;

	void InitMaxLevel();

public:
	XenInfo() {}
	XenInfo(IDirect3DDevice9 *pIDirect3DDevice9);

	void Initialize();
	void Render();
	void ProcessInput();
	void Release();
};